# coding: utf-8
# from database.tools.application_batch_test import db
from Flask_run import db

class Patient(db.Model):
    __tablename__ = 'patient'

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(255, 'utf8_general_ci'), info='姓名')
    sex = db.Column(db.String(4, 'utf8_general_ci'), info='性别')
    age = db.Column(db.String(255), info='年龄')
    pid = db.Column(db.String(255), index=True, info='患者编号') 
    borntime = db.Column(db.DateTime, info='出生日期')
    hospital = db.Column(db.String(255), info='医院名')

    def __init__(self,name,sex,age,pid,hospital,borntime):
        self.sex = sex
        self.pid = pid
        self.name = name
        self.age = age
        self.hospital = hospital
        self.borntime = borntime
